<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>absolute的方法居中2</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/common.css"/>
		<style type="text/css">
			.box{
				position: relative;
			}
			.item{
				height: 20%;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%,-50%)
			}
		</style>
	</head>
	<body>
		<div class="box">
			<div class="item">
				宽高为百分比
			</div>
		</div>
	</body>
</html>
